<template>
	<div class="import">
		<preview-images ref="previewImages" />
		<div class="product-name">家协保障险-服务者版</div>
		<flexbox gap="20px" style="margin-block: 15px">
			投保人类型
			<el-radio-group v-model="insureType">
				<el-radio label="企业">企业投保</el-radio>
				<el-radio label="个人">个人投保</el-radio>
			</el-radio-group>
		</flexbox>

		<QiyeForm
			v-if="insureType == '企业'"
			:startTime="startTime"
			:endTime="endTime"
			:activePlan="active_plan"
		/>
		<PersonForm
			v-else
			:startTime="startTime"
			:endTime="endTime"
			:activePlan="active_plan"
		/>
		<!-- {{ active_plan?.name }} {{ active_plan?.planId }} -->
	</div>
</template>

<script>
import QiyeForm from './qiyeForm.vue'
import PersonForm from './personForm.vue'
import { guarantee } from '@/api'
import _ from 'lodash'
import * as REGEXP from '@/const/REGEXP'
import moment from 'moment'
var urlSearchParams = new URLSearchParams(location.search)
var UrlSearch = {}
for (let [key, value] of urlSearchParams.entries()) {
	UrlSearch[key] = value
}
const productId = 13253
import { transformKey } from '@/utils'
import insureImport from '../components/insure-import.vue'

export default {
	components: { QiyeForm, PersonForm },
	data() {
		return {
			insureType: '企业'
		}
	},
	computed: {},
	async created() {
		// 开启录屏
		// const channel = 'rbjx-fwzb-pc'
		// const oldChannel = localStorage.getItem('channel')
		// if (oldChannel !== channel) {
		// 	localStorage.setItem('channel', channel)
		// 	Recorder.renew()
		// }
		// if (Recorder.status() !== 'living') {
		// 	Recorder.start({
		// 		channel,
		// 		compress: true,
		// 		testServer: 'https://service.aiins.cn/insurance/api/open/putJsonV2'
		// 	})
		// }
	},

	watch: {},
	methods: {}
}
</script>

<style lang="scss" scoped="scoped">
.product-name {
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	margin-block: 20px;
}

.import {
	max-width: 900px;
	margin-inline: auto;
	::v-deep {
		.el-form {
			display: grid;
			gap: 15px;
			grid-template-columns: 1fr 1fr;
		}

		.el-form-item {
			margin-bottom: 0;
		}

		.el-table__header tr th {
			font-size: 13px;
			color: #333;
			background: #fbfcff;
		}

		._error_ {
			color: #f22 !important;
		}
	}
}
</style>
